﻿using System.Collections.Generic;
using System.Web.Services;
using Logic;

namespace VotanetWebSite.WS
{
   
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // Para permitir que se llame a este servicio Web desde un script, usando ASP.NET AJAX, quite la marca de comentario de la línea siguiente. 
    [System.Web.Script.Services.ScriptService]
    public class WSAutocompleteUser : System.Web.Services.WebService
    {

        [WebMethod]
        public List<string> AutocompleteName(string prefixText)
        {
            return new UserLogic().AutocompleteByNameLogic(prefixText);
        }

        [WebMethod]
        public List<string> AutocompleteLastName(string prefixText)
        {
            return new UserLogic().AutocompleteByLastNameLogic(prefixText);
        }


        [WebMethod]
        public List<string> AutocompleteRut(string prefixText)
        {
            return new UserLogic().AutocompleteByRutLogic(prefixText);
        }


        [WebMethod]
        public List<string> AutocompleteEmail(string prefixText)
        {
            return new UserLogic().AutocompleteByEmailLogic(prefixText);
        }
    }
}
